package com.zhai.application.cotroller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("hell-world")
public class HelloWorldController {

    @RequestMapping("/index")
    public JSONObject GetUser(String name){
        JSONObject result = new JSONObject();
        result.put("name",name);
        result.put("age",28);
        result.put("say","Hello World !");
        return result;
    }

    @RequestMapping("/rpc")
    public JSONObject rpc(String name){
        JSONObject result = new JSONObject();
        result.put("name",name);
        result.put("age",28);
        result.put("say","Hello World !");
        return result;
    }

}
